import pygame
from .. import tools,setup
from .. import constants as C

class idleGirl(pygame.sprite.Sprite):
    def __init__(self):
        pygame.sprite.Sprite.__init__(self)
        self.frames=[]
        self.frameIndex=0
        frameRects=[(0,0,32,64),(32,0,32,64),(64,0,32,64),(96,0,32,64),(128,0,32,64),(160,0,32,64)]
        self.loadFrames(frameRects)
        self.rect=self.images.get_rect()
        self.rect.x=550
        self.rect.y=225

    def loadFrames(self,frameRects):
        sheet=setup.GRAPHICS['itemObjects']
        for frameRect in frameRects:
            self.frames.append(tools.get_frame(sheet,*frameRect,(0,0,0),C.BG_PLAYER))#*表解包
